import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Arrays;

public class Main3 {
    public static void main(String[] args) {
        Integer[] arr = {12,55,666,3,5,54,5,12};
        Arrays.sort(arr,(o1, o2) -> o2-o1);
        System.out.println(Arrays.toString(arr));

        JFrame win = new JFrame("窗口");
        JButton btn = new JButton("我是一个很大的按钮");
        win.add(btn);


//        btn.addActionListener(new ActionListener() {
//            @Override
//            public void actionPerformed(ActionEvent e) {
//                System.out.println("有人点我，点我，点我！！");
//            }
//        });


//        btn.addActionListener((ActionEvent e)->{
//            System.out.println("有人点我，点我！点我！");
//        });


        btn.addActionListener(e -> {
            System.out.println("有人点我，点我，点我");
        });
        win.setSize(300,400);
        win.setVisible(true);
    }
}